package cn.chenyu.util;

import org.omg.CORBA.Any;
import org.omg.CORBA.NameValuePair;

import java.util.*;

/**
 * 可依据Collections类  NameValuePair是一个键值对类型
 */
public class CollectionUtil {
    private CollectionUtil(){}
    //NameValuePair是一个键值对类型
    public static List<NameValuePair>  MapConversionNVP(Map<String,Object> map){
        List<NameValuePair> List = new ArrayList<NameValuePair>();
        Set<String> set = map.keySet();
        NameValuePair nameValuePair = null;
        for(String key : set){
            nameValuePair = new NameValuePair(key,(Any)map.get(key));
            System.out.println(map.get(key));
        }
        return List;
    }


}
